home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000240_fdc@sesame.cc.columbia.edu_Wed Aug 27 15:05:23 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  77 lines

  1. Article: 14480 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news-not-for-mail
  3. From: fdc@sesame.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: How to recover from a hangup?
  6. Date: 27 Aug 2003 15:05:16 -0400
  7. Organization: Columbia University
  8. Lines: 60
  9. Message-ID: <biivdc$t5d$1@sesame.cc.columbia.edu>
  10. References: <uoppkvgocr6vgbptg62fm7osanrjhontk3@4ax.com>
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1062011116 28690 128.59.59.56 (27 Aug 2003 19:05:16 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 27 Aug 2003 19:05:16 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14480
  16.  
  17. In article <uoppkvgocr6vgbptg62fm7osanrjhontk3@4ax.com>,
  18. dgk  <sonicechoesWithNoSpam@hotmail.com> wrote:
  19. : I have an app that uses some of the K95 provided scripts and answers
  20. : calls and has a simple dialog. I have a problem that results in the
  21. : Kermit dos box printing this line over and over:
  22. : ?Connection on Conexant HCF V90 56K Data Fax PCI Modem is not open.
  23. : The script is kicked off by this section of code from Dhostmdm.KSC
  24. : ; Break out of loop if there is a nonrecoverable error, otherwise
  25. : ; continue.
  26. : while 1 {
  27. :     answer
  28. :     if > \v(dialstatus) 0 if < \v(dialstatus) 22 stop 1 Fatal modem error
  29. :     if = \v(dialstatus) 0 take MM3.ksc
  30. :     echo Type Ctrl-C to exit...          ; Give user a chance to cancel
  31. :     sleep 2
  32. : }
  33. : MM3.KSC just asks for a username and password, and then a menu option
  34. : here:
  35. : ASG \%T 0
  36. : :GETCMD    ; What does the user want to do anyway?
  37. : OUTPUT \13\10Command:
  38. : CLEAR INPUT
  39. : INPUT 10 \13
  40. : DEF \%C
  41. : DEF \%Z \V(INPUT)
  42. : DO STRIP {\%Z}
  43. : IF = \FLENGTH(\%Z) 0 GOTO GETCMD
  44. : ASG \%C \%N
  45. : IF EQUAL {\%C} SND GOTO RECEIVE
  46. : IF EQUAL {\%C} {RCV R} GOTO SEND
  47. : IF EQUAL {\%C} BYE GOTO IFAIL
  48. : IF EQUAL {\%C} {RCV M} GOTO SENDM
  49. : OUTPUT \13\10REQUEST ERROR|\%C|
  50. : INC \%T 1
  51. : IF = \%T 4 GOTO IFAIL
  52. : GOTO GETCMD
  53. : I'll be the first person to admit that I don't know much of the Kermit
  54. : language but the code works some of the time that a user hangs up.
  55. : Othertimes I get that line repeating and have to restart Kermit.
  56. : Is there some error checking I should be doing here to prevent the
  57. : hangup from messing the modem up?
  58. :
  59. That's what it sounds like.  Every command that could fail should be
  60. checked.  Your MM3.KSC file is a GOTO loop containing INPUTs and OUTPUTs.
  61. These commands fail if the connection is lost, but your script doesn't
  62. check for it, so loops forever, printing error messages.  See the
  63. tutorial:
  64.  
  65.   http://www.columbia.edu/kermit/ckscripts.html#tut
  66.  
  67. - Frank
  68.